home *** CD-ROM | disk | FTP | other *** search
- /**
- * This is a set of routines to print data to the screen.
- * There are functions to do it using the BIOS int 10H
- * and an additional one print_memory to do it by moving
- * data directly to screen memory.
- **/
-
- #include <dos.h>
- #include <attrib.h>
- #define NULL 0
-
- /**
- * place cursor on the screen
- * format : int row, col;
- * set_curpos(row, col);
- *
- **/
- set_curpos (row, col)
- int row, col;
-
- {
- union REGS regs;
-
- regs.h.ah = 02; /* move cursor request */
- regs.h.bh = 00; /* page 0 */
- regs.h.dh = row;
- regs.h.dl = col;
-
- int86 (0x10, ®s, ®s);
- }
- /**
- * get current cursor position
- * format : int row, col;
- * get_curpos(&row,&col);
- *
- **/
- get_curpos(row, col)
- int *row, *col;
- {
-
- union REGS regs;
-
- regs.h.ah = 03;
- regs.h.bh = 00;
- int86 (0x10, ®s, ®s);
- *row = regs.h.dh;
- on REGS regs;